﻿<UserControl x:Class="SqlMiM.SqlMirroring.Options.MirroringOptions"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    MinHeight="200" MinWidth="200" Margin="10">
    <StackPanel>

        <TextBlock Foreground="{DynamicResource Foreground}" FontWeight="Bold" Margin="0,0,0,20">Mirroring options</TextBlock>

        <StackPanel Orientation="Horizontal">
            <TextBlock Foreground="{DynamicResource Foreground}" VerticalAlignment="Center" >Principal Machine Name :</TextBlock>
            <TextBox Text="{Binding PrincipalMachineName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="10,5,5,5" VerticalAlignment="Center" />
        </StackPanel>
        <Button Content="Ok" Command="{Binding SelectPrincipalCategoriesCommand}" Margin="10" VerticalAlignment="Center" />

        <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
            <TextBlock Foreground="{DynamicResource Foreground}" VerticalAlignment="Center" >Available categories :</TextBlock>
            <ComboBox ItemsSource="{Binding PrincipalCategories}"  SelectedItem="{Binding PrincipalCategory, Mode=TwoWay}"  
                      IsEditable="False" Margin="5" VerticalAlignment="Center" DisplayMemberPath="CategoryName" >
            </ComboBox>
        </StackPanel>
        <Button Content="Ok" MinWidth="50" Command="{Binding SelectPrincipalInstancesCommand}" Margin="10" VerticalAlignment="Center" />

        <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
            <TextBlock Foreground="{DynamicResource Foreground}" VerticalAlignment="Center" >Available instances :</TextBlock>
            <ComboBox ItemsSource="{Binding PrincipalInstances}" SelectedItem="{Binding PrincipalInstance, Mode=TwoWay}"  
                      IsEditable="False" Margin="5" VerticalAlignment="Center" />
        </StackPanel>
        <Button Content="Ok" MinWidth="50" Command="{Binding SelectPrincipalCountersCommand}" Margin="10" VerticalAlignment="Center" />

        <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
            <TextBlock Foreground="{DynamicResource Foreground}" VerticalAlignment="Center" >Available counters :</TextBlock>
            <ComboBox ItemsSource="{Binding PrincipalCounters}" SelectedItem="{Binding PrincipalCounter, Mode=TwoWay}"  
                      DisplayMemberPath="CounterName"
                      IsEditable="False" Width="80" Margin="5" VerticalAlignment="Center" />
        </StackPanel>

    </StackPanel>

</UserControl>
